function Prop(type) {
	this.node = document.createElement('img');
	this.type = type;
	this.src;
	this.x;
	this.y;
	this.speed;

	this.init();
}

Prop.prototype.init = function() {
	this.src = props[this.type].src;
	this.y = -propHeight;
	this.x = rnd(0, cWidth - propWidth);
	this.speed = 1;
	
	this.node.src = `img/${this.src}`;
	this.node.style.position = 'absolute';
	this.node.style.left = this.x + 'px';
	this.node.style.top = this.y + 'px';
	this.node.style.height = propHeight + 'px';
	this.node.style.width = propWidth + 'px';
	
	
	canvas.appendChild(this.node);
}

Prop.prototype.move = function() {
	// 超出画布删除道具
	if (this.y > cHeight) {
		canvas.removeChild(this.node);
		return true;
	}
	this.y+=this.speed;
	this.node.style.top = this.y+'px';
}
